package com.cow.pojo;

import java.util.ArrayList;
import java.util.List;

public class OrdersExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrdersExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOrderIdIsNull() {
            addCriterion("order_id is null");
            return (Criteria) this;
        }

        public Criteria andOrderIdIsNotNull() {
            addCriterion("order_id is not null");
            return (Criteria) this;
        }

        public Criteria andOrderIdEqualTo(String value) {
            addCriterion("order_id =", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotEqualTo(String value) {
            addCriterion("order_id <>", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThan(String value) {
            addCriterion("order_id >", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdGreaterThanOrEqualTo(String value) {
            addCriterion("order_id >=", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThan(String value) {
            addCriterion("order_id <", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLessThanOrEqualTo(String value) {
            addCriterion("order_id <=", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdLike(String value) {
            addCriterion("order_id like", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotLike(String value) {
            addCriterion("order_id not like", value, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdIn(List<String> values) {
            addCriterion("order_id in", values, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotIn(List<String> values) {
            addCriterion("order_id not in", values, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdBetween(String value1, String value2) {
            addCriterion("order_id between", value1, value2, "orderId");
            return (Criteria) this;
        }

        public Criteria andOrderIdNotBetween(String value1, String value2) {
            addCriterion("order_id not between", value1, value2, "orderId");
            return (Criteria) this;
        }

        public Criteria andAddressIdIsNull() {
            addCriterion("address_id is null");
            return (Criteria) this;
        }

        public Criteria andAddressIdIsNotNull() {
            addCriterion("address_id is not null");
            return (Criteria) this;
        }

        public Criteria andAddressIdEqualTo(String value) {
            addCriterion("address_id =", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdNotEqualTo(String value) {
            addCriterion("address_id <>", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdGreaterThan(String value) {
            addCriterion("address_id >", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdGreaterThanOrEqualTo(String value) {
            addCriterion("address_id >=", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdLessThan(String value) {
            addCriterion("address_id <", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdLessThanOrEqualTo(String value) {
            addCriterion("address_id <=", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdLike(String value) {
            addCriterion("address_id like", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdNotLike(String value) {
            addCriterion("address_id not like", value, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdIn(List<String> values) {
            addCriterion("address_id in", values, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdNotIn(List<String> values) {
            addCriterion("address_id not in", values, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdBetween(String value1, String value2) {
            addCriterion("address_id between", value1, value2, "addressId");
            return (Criteria) this;
        }

        public Criteria andAddressIdNotBetween(String value1, String value2) {
            addCriterion("address_id not between", value1, value2, "addressId");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(String value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(String value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(String value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(String value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(String value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(String value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLike(String value) {
            addCriterion("user_id like", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotLike(String value) {
            addCriterion("user_id not like", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<String> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<String> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(String value1, String value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(String value1, String value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andOrderStateIsNull() {
            addCriterion("order_state is null");
            return (Criteria) this;
        }

        public Criteria andOrderStateIsNotNull() {
            addCriterion("order_state is not null");
            return (Criteria) this;
        }

        public Criteria andOrderStateEqualTo(String value) {
            addCriterion("order_state =", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateNotEqualTo(String value) {
            addCriterion("order_state <>", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateGreaterThan(String value) {
            addCriterion("order_state >", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateGreaterThanOrEqualTo(String value) {
            addCriterion("order_state >=", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateLessThan(String value) {
            addCriterion("order_state <", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateLessThanOrEqualTo(String value) {
            addCriterion("order_state <=", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateLike(String value) {
            addCriterion("order_state like", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateNotLike(String value) {
            addCriterion("order_state not like", value, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateIn(List<String> values) {
            addCriterion("order_state in", values, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateNotIn(List<String> values) {
            addCriterion("order_state not in", values, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateBetween(String value1, String value2) {
            addCriterion("order_state between", value1, value2, "orderState");
            return (Criteria) this;
        }

        public Criteria andOrderStateNotBetween(String value1, String value2) {
            addCriterion("order_state not between", value1, value2, "orderState");
            return (Criteria) this;
        }

        public Criteria andCourierNumberIsNull() {
            addCriterion("courier_number is null");
            return (Criteria) this;
        }

        public Criteria andCourierNumberIsNotNull() {
            addCriterion("courier_number is not null");
            return (Criteria) this;
        }

        public Criteria andCourierNumberEqualTo(String value) {
            addCriterion("courier_number =", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberNotEqualTo(String value) {
            addCriterion("courier_number <>", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberGreaterThan(String value) {
            addCriterion("courier_number >", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberGreaterThanOrEqualTo(String value) {
            addCriterion("courier_number >=", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberLessThan(String value) {
            addCriterion("courier_number <", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberLessThanOrEqualTo(String value) {
            addCriterion("courier_number <=", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberLike(String value) {
            addCriterion("courier_number like", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberNotLike(String value) {
            addCriterion("courier_number not like", value, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberIn(List<String> values) {
            addCriterion("courier_number in", values, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberNotIn(List<String> values) {
            addCriterion("courier_number not in", values, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberBetween(String value1, String value2) {
            addCriterion("courier_number between", value1, value2, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andCourierNumberNotBetween(String value1, String value2) {
            addCriterion("courier_number not between", value1, value2, "courierNumber");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIsNull() {
            addCriterion("order_totalprice is null");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIsNotNull() {
            addCriterion("order_totalprice is not null");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceEqualTo(String value) {
            addCriterion("order_totalprice =", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotEqualTo(String value) {
            addCriterion("order_totalprice <>", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceGreaterThan(String value) {
            addCriterion("order_totalprice >", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceGreaterThanOrEqualTo(String value) {
            addCriterion("order_totalprice >=", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceLessThan(String value) {
            addCriterion("order_totalprice <", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceLessThanOrEqualTo(String value) {
            addCriterion("order_totalprice <=", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceLike(String value) {
            addCriterion("order_totalprice like", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotLike(String value) {
            addCriterion("order_totalprice not like", value, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIn(List<String> values) {
            addCriterion("order_totalprice in", values, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotIn(List<String> values) {
            addCriterion("order_totalprice not in", values, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceBetween(String value1, String value2) {
            addCriterion("order_totalprice between", value1, value2, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotBetween(String value1, String value2) {
            addCriterion("order_totalprice not between", value1, value2, "orderTotalprice");
            return (Criteria) this;
        }

        public Criteria andOrderNotesIsNull() {
            addCriterion("order_notes is null");
            return (Criteria) this;
        }

        public Criteria andOrderNotesIsNotNull() {
            addCriterion("order_notes is not null");
            return (Criteria) this;
        }

        public Criteria andOrderNotesEqualTo(String value) {
            addCriterion("order_notes =", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesNotEqualTo(String value) {
            addCriterion("order_notes <>", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesGreaterThan(String value) {
            addCriterion("order_notes >", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesGreaterThanOrEqualTo(String value) {
            addCriterion("order_notes >=", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesLessThan(String value) {
            addCriterion("order_notes <", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesLessThanOrEqualTo(String value) {
            addCriterion("order_notes <=", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesLike(String value) {
            addCriterion("order_notes like", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesNotLike(String value) {
            addCriterion("order_notes not like", value, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesIn(List<String> values) {
            addCriterion("order_notes in", values, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesNotIn(List<String> values) {
            addCriterion("order_notes not in", values, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesBetween(String value1, String value2) {
            addCriterion("order_notes between", value1, value2, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderNotesNotBetween(String value1, String value2) {
            addCriterion("order_notes not between", value1, value2, "orderNotes");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeIsNull() {
            addCriterion("order_addtime is null");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeIsNotNull() {
            addCriterion("order_addtime is not null");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeEqualTo(String value) {
            addCriterion("order_addtime =", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeNotEqualTo(String value) {
            addCriterion("order_addtime <>", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeGreaterThan(String value) {
            addCriterion("order_addtime >", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeGreaterThanOrEqualTo(String value) {
            addCriterion("order_addtime >=", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeLessThan(String value) {
            addCriterion("order_addtime <", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeLessThanOrEqualTo(String value) {
            addCriterion("order_addtime <=", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeLike(String value) {
            addCriterion("order_addtime like", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeNotLike(String value) {
            addCriterion("order_addtime not like", value, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeIn(List<String> values) {
            addCriterion("order_addtime in", values, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeNotIn(List<String> values) {
            addCriterion("order_addtime not in", values, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeBetween(String value1, String value2) {
            addCriterion("order_addtime between", value1, value2, "orderAddtime");
            return (Criteria) this;
        }

        public Criteria andOrderAddtimeNotBetween(String value1, String value2) {
            addCriterion("order_addtime not between", value1, value2, "orderAddtime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}